package com.haidechizi.fastadmin.modules.code.entity;

import com.haidechizi.i18n.code.generator.common.dynamic.enums.I18nTypeEnum;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotEmpty;
import java.io.Serializable;

/**
 * @author wangdejun
 * @create 2020/10/30 14:05
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class DynamicCodeField implements Serializable {
    private static final long serialVersionUID = 3734367538177435775L;

    private boolean translate;
    private String systemCode;
    private String businessCode;
    private String businessKey;
    private String value;
    private String metaCalculator;
    private String i18nFieldReplacePattern;
    private int i18nType;

    public DynamicCodeField(String value, String i18nFieldReplacePattern) {
        this.value = value;
        this.i18nFieldReplacePattern = i18nFieldReplacePattern;
        this.translate = false;
        this.businessKey = "id";
        this.i18nType = I18nTypeEnum.SIMPLE.getType();
    }
}
